↳ Prolog
↳ PrologToPiTRSProof
balance_in(T, TB) → U1(T, TB, balance55_in(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, []))
balance55_in(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance55_in(nil, C, T, T, A, B, A, B, X, X) → balance55_out(nil, C, T, T, A, B, A, B, X, X)
U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)) → balance55_out(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT)
U1(T, TB, balance55_out(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, [])) → balance_out(T, TB)
Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
balance_in(T, TB) → U1(T, TB, balance55_in(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, []))
balance55_in(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance55_in(nil, C, T, T, A, B, A, B, X, X) → balance55_out(nil, C, T, T, A, B, A, B, X, X)
U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)) → balance55_out(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT)
U1(T, TB, balance55_out(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, [])) → balance_out(T, TB)
BALANCE_IN(T, TB) → U11(T, TB, balance55_in(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, []))
BALANCE_IN(T, TB) → BALANCE55_IN(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, [])
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → BALANCE55_IN(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))
U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U31(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → BALANCE55_IN(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)
balance_in(T, TB) → U1(T, TB, balance55_in(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, []))
balance55_in(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance55_in(nil, C, T, T, A, B, A, B, X, X) → balance55_out(nil, C, T, T, A, B, A, B, X, X)
U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)) → balance55_out(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT)
U1(T, TB, balance55_out(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, [])) → balance_out(T, TB)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
BALANCE_IN(T, TB) → U11(T, TB, balance55_in(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, []))
BALANCE_IN(T, TB) → BALANCE55_IN(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, [])
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → BALANCE55_IN(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))
U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U31(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → BALANCE55_IN(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)
balance_in(T, TB) → U1(T, TB, balance55_in(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, []))
balance55_in(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance55_in(nil, C, T, T, A, B, A, B, X, X) → balance55_out(nil, C, T, T, A, B, A, B, X, X)
U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)) → balance55_out(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT)
U1(T, TB, balance55_out(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, [])) → balance_out(T, TB)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → BALANCE55_IN(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → BALANCE55_IN(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance_in(T, TB) → U1(T, TB, balance55_in(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, []))
balance55_in(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance55_in(nil, C, T, T, A, B, A, B, X, X) → balance55_out(nil, C, T, T, A, B, A, B, X, X)
U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)) → balance55_out(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT)
U1(T, TB, balance55_out(T, XX0, XX1, [], .(','(nil, -(XX0, XX0)), XX1), [], .(','(TB, -(I, [])), X), X, I, [])) → balance_out(T, TB)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → BALANCE55_IN(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → BALANCE55_IN(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))
BALANCE55_IN(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U21(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance55_in(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT) → U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1)))
balance55_in(nil, C, T, T, A, B, A, B, X, X) → balance55_out(nil, C, T, T, A, B, A, B, X, X)
U2(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(L, XX0, XX1, .(','(nil, -(XX2, XX2)), XX3), HR1, TR1, H, T, IH, .(V, IT1))) → U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_in(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT))
U3(L, V, R, XX0, XX1, NT, HR, TR, LB, VB, RB, A, D, H, X, T, IH, IT, balance55_out(R, XX2, XX3, NT, HR, TR, HR1, TR1, IT1, IT)) → balance55_out(tree(L, V, R), XX0, XX1, NT, HR, TR, .(','(tree(LB, VB, RB), -(A, D)), H), .(','(LB, -(A, .(VB, X))), .(','(RB, -(X, D)), T)), IH, IT)
↳ Prolog
↳ PrologToPiTRSProof
↳ PiTRS
↳ DependencyPairsProof
↳ PiDP
↳ DependencyGraphProof
↳ PiDP
↳ UsableRulesProof
↳ PiDP
↳ PiDPToQDPProof
↳ QDP
↳ QDPSizeChangeProof
BALANCE55_IN(tree(L, V, R)) → U21(R, balance55_in(L))
BALANCE55_IN(tree(L, V, R)) → BALANCE55_IN(L)
U21(R, balance55_out) → BALANCE55_IN(R)
balance55_in(tree(L, V, R)) → U2(R, balance55_in(L))
balance55_in(nil) → balance55_out
U2(R, balance55_out) → U3(balance55_in(R))
U3(balance55_out) → balance55_out
balance55_in(x0)
U2(x0, x1)
U3(x0)
From the DPs we obtained the following set of size-change graphs: